from django.shortcuts import render

# Create your views here.
from django.views.generic import ListView

from .models import Book

from .serializers import BookListSerializer
from rest_framework import viewsets, generics

class BookListView(generics.ListAPIView):
    
    queryset = Book.objects.all().order_by('id')
    serializer_class = BookListSerializer
    def get(self, request, *args, **kwargs):
        print(request.user.id)
        return self.list(request, *args, **kwargs)